/**
 * created by dqn 2018/3/13 17:30
 */

package main.controller.pages;

import main.entity.WebUser;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import main.entity.WebUser;
import javax.servlet.http.HttpSession;

@Controller
public class UserProfileController {
    @RequestMapping(value = "/user/profile",method = RequestMethod.GET)
    public String profilePage(HttpSession httpSession){
        WebUser webUser = (WebUser) httpSession.getAttribute("user");
<<<<<<< Updated upstream
        if (webUser == null){
            return "redirect:/";
        }
        return "love";
=======
        if(webUser == null ){
            return "redirect:/";
        }else{
            return "love";
        }
>>>>>>> Stashed changes
    }
}
